﻿<%@ Page Language="C#" AutoEventWireup="True" CodeBehind="ManyToManyTypeManagement.aspx.cs" Inherits="Medianamik.UI.TypeManagement.ManyToManyTypeManagement" MasterPageFile="/medianamik/MasterPages/MedianamikModule.Master" %>
<%@ Register  TagPrefix="uc" TagName ="ManyToManyPropertySettings"  Src="Controls/ManyToManyPropertySettings.ascx" %>
<%@ Register  TagPrefix="sc" Namespace="Medianamik.UI.TypeManagement.Controls" Assembly="Medianamik.UI.Web" %>
<asp:Content ID="HeaderContentHolder" runat="server" ContentPlaceHolderID="HeaderContentHolder"></asp:Content>

<asp:Content ID="ContextMenuContent" ContentPlaceHolderID="ContextMenu" runat="server">
    <asp:LinkButton ID="btnSave" runat="server" CssClass="Action BtSauvegarder" OnClick="btnSave_Click" Text="Sauvegarder" />
    <a href="<%= ReturnURL %>" class="Action BtAnnuler">Annuler</a>
</asp:Content>

<asp:Content ID="CenterContent" ContentPlaceHolderID="CenterContent" runat="server">
<asp:UpdatePanel ID="uptPanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
    <ContentTemplate>
        <asp:ValidationSummary runat="server" CssClass="ValidationSummary" EnableClientScript="true" />
	    <p><span class="ChampObligatoire">*</span><%=Resources("Medianamik_Global", "RequiredField") %></p>
    	
	    <fieldset>
		    <p><label><%=Resources("Medianamik_TypeManagement", "ManyToManyTypeName") %><span class="ChampObligatoire">*</span>
		    <asp:RequiredFieldValidator ID="reqTypeName" runat="server" ControlToValidate="txtTypeName" Text="Ce champ est requis." ErrorMessage="Le nom du type est requis." Display="None" />
		    <asp:RegularExpressionValidator ID="regTypeName" runat="server" ControlToValidate="txtTypeName" Text="Ce champ n'est pas valide." ErrorMessage="Le nom du type n'est pas valide." Display="None" ValidationExpression="[A-Z][a-zA-Z]*" /></label>
		    <asp:TextBox ID="txtTypeName" runat="server" CssClass="TxtBox" /></p>
		    <p><med:TranslatorBox runat="server"  ID="TypeNameTranslations" Required="true" ErrorMessage="Traduction Requise "  /></p><br />
		    <p><label>Description</label><asp:TextBox CssClass="TxtBox" runat="server" id="txtTypeDescription" TextMode="MultiLine" ></asp:TextBox></p>
		    <%--<p><asp:CheckBox ID="chkIsGenerated" runat="server" TabIndex="3" Text="Doit être généré" /></p>--%>
		    <p><asp:CheckBox ID="chkIsSystem" runat="server" TabIndex="3" Text="Is system" /></p>
	    </fieldset>
    		
	    <div class="clear"></div>
    		
	    <fieldset class="Colonne">
		    <!-- Première propriété -->
		    <uc:ManyToManyPropertySettings runat="server" ID="PropertyOne"></uc:ManyToManyPropertySettings>
    			
	    </fieldset>
    		
	    <fieldset class="Colonne">
		    <!-- Deuxième propriété -->
		    <uc:ManyToManyPropertySettings runat="server" ID="PropertyTwo"></uc:ManyToManyPropertySettings>
		    <asp:CustomValidator runat="server" ID="cvPropertyNames"  EnableClientScript ="false"
		     Display="None" ErrorMessage="Les deux propriétés doivent avoir un nom différent"
		      OnServerValidate ="cvPropertyNames_ServerValidate"></asp:CustomValidator>
    		
	    </fieldset>
    </ContentTemplate>
</asp:UpdatePanel>
<div class="clear"></div>
		
</asp:Content>
